import React from 'react';
import { useNavigate } from 'react-router-dom';
import { Button, Space } from 'antd-mobile'
import { CheckOutline } from 'antd-mobile-icons'
import './index.module.scss';
interface orderFinishProps {
	// orderStatus: number;
}
export default function orderFinish(props: orderFinishProps) {
	// const { orderStatus } = props;
	const navigate = useNavigate();
	const viewOrder = () => {
		navigate(`/orderDetail?orderId=1&boxShow=false&orderStatus=1`);
	}
	const backHome = () => {
		navigate('/');
	}
	return (
		<div styleName='finish-content'>
			<div styleName="right-icon">
				<CheckOutline styleName='icon' />
			</div>
			<div styleName='finish-word'>支付成功</div>
			<div styleName='success-word'>购票出票成功!</div>
			<Space justify='between' style={{ '--gap': '50px' }}>
				<Button styleName="finish-button" onClick={() => viewOrder()}>查看订单</Button>
				<Button styleName="finish-button" onClick={() => backHome()}>返回首页</Button>
			</Space>
		</div>
	);
}
